Skip to content

Let a target build a DOM-free simulator bundle - #11786

Draft
Eric Anderson (humanapp) wants to merge 1 commit into
humanapp/stack/4-simcore-movefrom
humanapp/stack/5-core-bundles
Draft

Eric Anderson (humanapp) wants to merge 1 commit into
humanapp/stack/4-simcore-movefrom
humanapp/stack/5-core-bundles

Conversation

@humanapp

@humanapp Eric Anderson (humanapp) commented Nov 24, 2026 •

Copy link
Copy Markdown
Collaborator

Fifth of the stacked PRs replacing #11665 (5/7).

  • pxt buildtarget compiles sim/tsconfig.core.json to built/simcore.js when a target has one, before sim/tsconfig.json. Targets without one build as before.
  • Added a prepend list to sim/tsconfig.json. The build concatenates the listed files, and their .d.ts, ahead of the compiled output, so sim.js is simcore.js plus the view code.
  • Adjusted the sequencing in cli.ts: the simulator builds before the target core so coverage sees it on the first build, and the shim scan no longer duplicates tsc diagnostics.

- pxt buildtarget compiles sim/tsconfig.core.json to built/simcore.js when a target has one, before sim/tsconfig.json. Targets without one build as before.
- Added a prepend list to sim/tsconfig.json. The build concatenates the listed files, and their .d.ts, ahead of the compiled output, so sim.js is simcore.js plus the view code.
- The npm-installed simulator and the common target build the same way.
- Two incidental changes: the simulator builds before the target core so coverage sees it on the first build, and the shim scan no longer duplicates tsc diagnostics.

Build, the cli tests and the simulator test tasks pass.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant